<template>
  <div class="bot-bar">
    <div class="bot-bar-top-img">
      <img src="~@/assets/logo.png" />
    </div>
    <div v-if="botBarList.length > 0" class="bot-bar-list">
      <div
        v-for="(baritem, barindex) in botBarList"
        :key="barindex"
        :class="
          noselectndex === barindex
            ? 'bot-bar-list-line-select'
            : 'bot-bar-list-line'
        "
      >
        <div class="bot-bar-list-line-one">
          <div class="wave-content">
            <div class="wave wave1"></div>
            <div class="wave wave2"></div>
            <div class="wave wave3"></div>
            <div class="wave wave4"></div>
          </div>
          <div class="bot-bar-list-line-imgview">
            <!-- <img
              class="bot-bar-list-line-img"
              :src="
                noselectndex === barindex
                  ? require('@/assets/bottom-bar/' +
                    baritem.icon +
                    's.png')
                  : require('@/assets/bottom-bar/' +
                    baritem.icon +
                    '.png')
              "
            /> -->
            <img
              class="bot-bar-list-line-img"
              :src="
                noselectndex === barindex
                  ? 'data:image/png;base64,' + baritem.clickedLogo
                  : 'data:image/png;base64,' + baritem.notClickedLogo
              "
            />
          </div>
        </div>
        <div class="bot-bar-list-line-name">
          {{ baritem.navigationName }}
          <!-- {{ baritem.name }} -->
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    'botBarList': {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      noselectndex: 66
      // botBarList: [
      //   { name: "景区概览", icon: "bar1", id: 1 },
      //   { name: "基地概览", icon: "bar2", id: 2 },
      //   { name: "景区运营", icon: "bar3", id: 3 },
      //   { name: "农产品销售", icon: "bar4", id: 4 },
      //   { name: "休闲农旅", icon: "bar5", id: 5 },
      //   { name: "共同富裕", icon: "bar6", id: 6 }
      // ]
    };
  }
};
</script>

<style lang="scss" scoped>
  @import "~@/styles/variables.scss";
.bot-bar {
  background-image: url("../../assets/bottom-bar/bot-img.png");
  background-repeat: no-repeat;
  background-size: 70% 100px;
  background-position: bottom;
  width: 100%;
  height: 100px;
  overflow: hidden;
  position: relative;
  .bot-bar-top-img {
    $imgheight-one: 60px;
    $imgheight-two: 60px;
    position: absolute;
    top: 0;
    z-index: 14;
    // background-color: #00ffc7;
    width: 100%;
    height: $imgheight-one;
    display: flex;
    justify-content: center;
    align-items: center;
    img {
      max-width: $imgheight-two;
      max-height: $imgheight-two;
      // background-color: #00ffc7;
    }
  }
  .bot-bar-list {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-content: flex-start;
    position: absolute;
    height:50px;
    $bot-bar-height:50px;
    $bot-bar-height-img: 25px;
    $bot-bar-heighttwo: 50px;
    // background-color: #00f1a7;
    bottom: 0;
    z-index: 15;
    .bot-bar-list-line {
      width: 100px;
      height: 50px;
      display: flex;
      flex-direction: column;
      flex-wrap: nowrap;
      justify-content: center;
      align-items: center;
      cursor: pointer;
      position: relative;
    //   bottom: 20px;
      .bot-bar-list-line-one {
        width: 100px;
        position: relative;
        height: 100px;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        .wave-content {
          height: $bot-bar-height-img;
          width: $bot-bar-height-img;

          position: relative;
          .wave {
            position: absolute;
            left: 0px;
            top: 0px;
            height: 100%;
            width: 100%;
            transform-origin: center center;
            background-color: transparent;
            border: 1px solid #979797;
            animation-duration: 7s;
            animation-name: wv;
            animation-timing-function: linear;
            animation-iteration-count: infinite;
            border-radius: 50%;
            opacity: 0;
          }

          .wave1 {
            animation-delay: 0s;
          }

          .wave2 {
            animation-delay: 1.5s;
          }

          .wave3 {
            animation-delay: 3s;
          }

          .wave4 {
            animation-delay: 4.5s;
          }

          @keyframes wv {
            0% {
              opacity: 0;
              transform: scale(0.5);
            }

            30% {
              opacity: 0.7;
              transform: scale(0.65);
            }

            70% {
              opacity: 0.1;
              transform: scale(0.85);
            }

            100% {
              opacity: -0.2;
              transform: scale(1);
            }
          }
        }
        .bot-bar-list-line-imgview {
          width: $bot-bar-height;
          position: absolute;
          height: $bot-bar-height;
          top: 0;
          display: flex;
          justify-content: center;
          align-items: center;
          .bot-bar-list-line-img {
            width: 35px;
            height: 35px;

            margin-bottom: 40px;
          }
        }
      }
      .bot-bar-list-line-name {
        margin-top: 6px;
        line-height: 25px;
        width: 100px;
        height: 25px;
        text-align: center;
        color: $textColor;
        letter-spacing: 2px;
        font-size: 16px;
        position: absolute;
        bottom: 10px;
      }
    }
    .bot-bar-list-line-select {
      width: $bot-bar-heighttwo;
      height: $bot-bar-height;
      display: flex;
      flex-direction: column;
      flex-wrap: nowrap;
      justify-content: center;
      align-items: center;
      cursor: pointer;
      position: relative;
      .bot-bar-list-line-one {
        width: $bot-bar-heighttwo;
        position: absolute;
        top: -10px;
        height: $bot-bar-height;
        .wave-content {
          height: $bot-bar-heighttwo;
          width: $bot-bar-heighttwo;

          position: relative;
          .wave {
            position: absolute;
            left: 0px;
            top: 0px;
            height: 100%;
            width: 100%;
            transform-origin: center center;
            background-color: transparent;
            border: 3px solid #00f8b1;
            animation-duration: 7s;
            animation-name: wv;
            animation-timing-function: linear;
            animation-iteration-count: infinite;
            border-radius: 50%;
            opacity: 0;
          }

          .wave1 {
            animation-delay: 0s;
          }

          .wave2 {
            animation-delay: 1.5s;
          }

          .wave3 {
            animation-delay: 3s;
          }

          .wave4 {
            animation-delay: 4.5s;
          }

          @keyframes wv {
            0% {
              opacity: 0;
              transform: scale(0.5);
            }

            30% {
              opacity: 0.7;
              transform: scale(0.65);
            }

            70% {
              opacity: 0.1;
              transform: scale(0.85);
            }

            100% {
              opacity: -0.2;
              transform: scale(1);
            }
          }
        }
        .bot-bar-list-line-imgview {
          width: $bot-bar-heighttwo;
          position: absolute;
          height: $bot-bar-heighttwo;
          top: 0;
          display: flex;
          justify-content: center;
          align-items: center;
          .bot-bar-list-line-img {
            width: 45px;
            height: 45px;
            border: #00c883 1px solid;
            border-radius: 5px;
            background-color: #000000;
            padding: 5px;
          }
        }
      }
      .bot-bar-list-line-name {
        margin-top: 6px;
        line-height: 25px;
        width: $bot-bar-heighttwo;
        height: 25px;
        text-align: center;
        color: #00f8b1;
        letter-spacing: 2px;
        font-size: 18px;
        font-weight: 600;
        position: absolute;
        bottom: 10px;
      }
    }
  }
}
</style>
